/**
 * Copyright 2015-2016 eyaomall.cn
 * All rights reserved.
 *
 * @project
 * @author yuhuafeng
 * @version 1.0
 * @date 2016-01-06
 */
package com.eyaomall.wxmall.service;

import com.eyaomall.wxmall.model.po.DiscountGoods;
import com.eyaomall.wxmall.model.vo.DiscountGoodsVO;
import com.eyaomall.wxmall.model.vo.DiscountRecordVO;
import com.lycheeframework.core.cmp.kit.PageHTTPObject;
import com.lycheeframework.core.cmp.kit.Pages;

/**
 * 商品砍价服务
 * @author yuhuafeng
 *
 */
public interface DiscountGoodsService {

	/**
	 * 分页查询商品砍价活动
	 * @param vo
	 * @param httpObject
	 * @return
	 */
	Pages<?> page(DiscountGoods vo, PageHTTPObject httpObject);
	
	
	/**
	 * 分页查询用户砍价活动记录
	 * @param vo
	 * @param httpObject
	 * @return
	 */
	Pages<?> pageRecord(DiscountRecordVO vo, PageHTTPObject httpObject);


	/**
	 * 根据活动id获取活动详情
	 * @param discountid
	 * @return
	 */
	DiscountGoodsVO queryById(Integer discountid);


	/**
	 * 参加砍价活动
	 * @param discountid
	 * @return
	 */
	Integer join(Integer discountid,Integer num);


	/**
	 * 根据用户的参与活动的id查询用户活动详情
	 * @param discountid
	 * @return
	 */
	DiscountRecordVO queryByMemberDiscountId(Integer discountid);


	/**
	 * 根据活动id获取该用户所有帮忙砍价记录
	 * @param discountId
	 * @return
	 */
	 Pages<?> queryListLog(Integer discountId,PageHTTPObject httpObject);


	 /**
	  * 砍价服务
	  * @param discountid 砍价的活动列表
	  * @return
	 */
	boolean bargain(Integer discountid,String phone);

	/**
	 * 分页查询商品砍价活动,根据自定义规则,进行中的活动优先级最高，即将开始的中等，已经结束的最低
	 * @param vo
	 * @param httpObject
	 * @return
	 */
	Pages<?> pageByCustom(DiscountGoods vo, PageHTTPObject httpObject);

}
